package com.ebupt.migu.music.api.entity;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * Created by Intellij IDEA.
 * User:  liuyangyang@cd.ebupt.com
 * Date:  2019/10/24
 */
@Getter
@Setter
public class PushRequestBody {
    /**
     * appid
     */
    private String appId;
    /**
     * 任务id,唯一标示 同一批任务taskId保持一致 数字字母组成
     */
    private String taskId;
    /**
     * 推送的消息主题
     */
    private String topic;
    /**
     * 是否同步推送
     * 默认值: false
     */
    private Boolean isSync;
    /**
     * 推送的消息内容 大小限制2K
     */
    private PushContentObject content;
    /**
     * 推送渠道1-个推 当前只支持个推渠道
     */
    private String pushChannel;
    /**
     * 按用户uid列表推送
     * 按uid列表推送时单次最大限制500条
     */
    private List<String> uid;
    /**
     * 按用户客户端cid列表进行推送
     * 推送时优先使用uid
     * 按cid列表推送时单次最大限制500条
     */
    private List<String> cid;
    /**
     * 按照用户客户端的设备号进行推送
     * 推送时优先使用uid，其次cid，最后提取did列表
     * 按did列表推送时单次最大限制500条
     */
    private List<String> did;
    /**
     * 消息附加内容， IOS附加字段
     */
    private PushExtraObject extra;
    /**
     * 消息推送策略
     */
    private PushPolicyObject policy;

    @Override
    public String toString() {
        return "PushRequestBody{" +
                "appId='" + appId + '\'' +
                ", taskId='" + taskId + '\'' +
                ", topic='" + topic + '\'' +
                ", isSync=" + isSync +
                ", content=" + content +
                ", pushChannel='" + pushChannel + '\'' +
                ", uid=" + uid +
                ", cid=" + cid +
                ", did=" + did +
                ", extra=" + extra +
                ", policy=" + policy +
                '}';
    }
}
